﻿

<div>
    <form name="articleCreateOrEditForm" role="form" novalidate class="form-validation">
        <div class="modal-header">
            <h4 class="modal-title">
                <span ng-if="vm.article.id">编辑信息:{{vm.article.name}}</span>
                <span ng-if="!vm.article.id">新增信息</span>
            </h4>
        </div>
        <div class="modal-body">

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <select chosen search_contains="true" name="CategoryId" class="form-control edited ng-pristine ng-valid ng-not-empty ng-touched" ng-model="vm.article.categoryId">
                    <option ng-repeat="x in vm.articleCategoryList" value="{{x.value}}" ng-selected="vm.article.categoryId==x.value">{{x.displayText}}</option>
                </select>

                <label>类别</label>
                <span class="help-block">     @L("CategoryId")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="Title" ng-class="{'edited':vm.article.title}" ng-model="vm.article.title" maxlength="100" required />
                <label>标题</label>
                <span class="help-block">     @L("Title")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="CallIndex" ng-class="{'edited':vm.article.callIndex}" ng-model="vm.article.callIndex" />
                <label>调用别名</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="LinkUrl" ng-class="{'edited':vm.article.linkUrl}" ng-model="vm.article.linkUrl" />
                <label>外部链接</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Publisher" ng-class="{'edited':vm.article.publisher}" ng-model="vm.article.publisher" required />
                <label>@L("Publisher")</label>
                <span class="help-block">     @L("Publisher")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="text" class="form-control" name="Source" ng-class="{'edited':vm.article.source}" ng-model="vm.article.source" required />
                <label>@L("NewSource")</label>
                <span class="help-block">     @L("NewSource")@L("MustBe_Required")</span>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <label class="font-noraml" style="display: none;">文件选择（单选）</label>
                <div>
                    <input type="file" class="form-control" style="display: none;">
                    <div class="input-append input-group" ng-click="vm.fileClick()">
                        <span class="input-group-btn">
                            <button class="btn btn-primary" type="button">选择文件</button>
                        </span>
                        <input class="input-large form-control" type="text" value="{{vm.fileUrl}}" style="width: 780px !important;padding-left: 10px;">
                    </div>
                </div>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input id="FileID" type="file" name="FileID" nv-file-select uploader="vm.uploader" />
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <input type="number" class="form-control" name="SortId" ng-class="{'edited':vm.article.sortId}" ng-model="vm.article.sortId" />
                <label>@L("SortId")</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint mrshen2">
                <div class="md-checkbox-list">
                    <div class="md-checkbox">
                        <input id="EditArticle_IsSlide" class="md-check" type="checkbox" name="IsSlide" ng-model="vm.article.isSlide">
                        <label for="EditArticle_IsSlide">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            @L("IsSlide")
                        </label>
                    </div>
                </div>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <textarea auto-focus class="form-control" ng-class="{'edited':vm.article.contentAbstract}" rows="4" ng-model="vm.article.contentAbstract"></textarea>
                <label>内容摘要</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="Click" ng-class="{'edited':vm.article.click}" ng-model="vm.article.click" />
                <label>浏览次数</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="Status" ng-class="{'edited':vm.article.status}" ng-model="vm.article.status" />
                <label>状态0正常1未审核2锁定</label>
            </div>
            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <div class="md-checkbox-list">
                    <div class="md-checkbox">
                        <input id="EditArticle_IsMsg" class="md-check" type="checkbox" name="IsMsg" ng-model="vm.article.isMsg">
                        <label for="EditArticle_IsMsg">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            @L("IsMsg")
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <div class="md-checkbox-list">
                    <div class="md-checkbox">
                        <input id="EditArticle_IsTop" class="md-check" type="checkbox" name="IsTop" ng-model="vm.article.isTop">
                        <label for="EditArticle_IsTop">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            @L("IsTop")
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <div class="md-checkbox-list">
                    <div class="md-checkbox">
                        <input id="EditArticle_IsRed" class="md-check" type="checkbox" name="IsRed" ng-model="vm.article.isRed">
                        <label for="EditArticle_IsRed">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            @L("IsRed")
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <div class="md-checkbox-list">
                    <div class="md-checkbox">
                        <input id="EditArticle_IsHot" class="md-check" type="checkbox" name="IsHot" ng-model="vm.article.isHot">
                        <label for="EditArticle_IsHot">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            @L("IsHot")
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <div class="md-checkbox-list">
                    <div class="md-checkbox">
                        <input id="EditArticle_IsSys" class="md-check" type="checkbox" name="IsSys" ng-model="vm.article.isSys">
                        <label for="EditArticle_IsSys">
                            <span class="inc"></span>
                            <span class="check"></span>
                            <span class="box"></span>
                            @L("IsSys")
                        </label>
                    </div>
                </div>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint" ng-show="false">
                <input type="text" class="form-control" name="LikeCount" ng-class="{'edited':vm.article.likeCount}" ng-model="vm.article.likeCount" />
                <label>喜欢数量</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <div class="ueditor" ng-model="vm.article.content" style="width: 100%;"></div>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="SeoTitle" ng-class="{'edited':vm.article.seoTitle}" ng-model="vm.article.seoTitle" maxlength="500" />
                <label>SEO标题</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="SeoKeyWords" ng-class="{'edited':vm.article.seoKeyWords}" ng-model="vm.article.seoKeyWords" maxlength="500" />
                <label>SEO关健字</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label no-hint">
                <input type="text" class="form-control" name="SeoDescription" ng-class="{'edited':vm.article.seoDescription}" ng-model="vm.article.seoDescription" maxlength="500" />
                <label>SEO描述</label>
            </div>


        </div>
        <div class="modal-footer">
            <button ng-disabled="vm.saving" type="button" class="btn btn-default" ng-click="vm.cancel()">@L("Cancel")</button>
            <button type="submit" button-busy="vm.saving" busy-text="@L("SavingWithThreeDot")" class="btn btn-primary blue" ng-click="vm.save()" ng-disabled="articleCreateOrEditForm.$invalid"><i class="fa fa-save"></i> <span>@L("Save")</span></button>
        </div>
    </form>
</div>